package etc.spec.ytt.week09;

import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;

public class CalenderTest {
    public static void main(String[] args){
        Calendar cal=Calendar.getInstance();
        SimpleDateFormat sdf=new SimpleDateFormat("yyyy/MM/EEEE");
        cal.set(Calendar.DAY_OF_MONTH,1);
        int n=1;
        while(n<=12) {
            if (cal.get(Calendar.DAY_OF_WEEK) == Calendar.MONDAY) {
                Date date = cal.getTime();
                System.out.println(sdf.format(date));
                n++;
            }
            cal.add(Calendar.MONTH,1);
        }
    }
}
